home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
L' Effet Pommier 3
/
L'Effet Pommier - Volume 03.iso
/
Bases de données
/
Roberto's Package Last Version
/
Dossier Éditer les scripts 2.0
/
Éditer les scripts 2.1.'Scpt
< prev
next >
Wrap
Text File
|
1995-10-01
|
11KB
|
344 lines
12:36 ╤ Dimanche 1 Octobre 1995
╫ Document rÄalisÄ avec ╟ âditer les scripts ╚ - Version 2.1.2 par Roberto Minotti & Jean Patrick Wendt. ╫
Pour une parfaite lisibilitÄ de ce document, utilisez la police Monaco 9 points.
Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ SCRIPT DE PILE ╟ âditer les scripts 2.1.2 ╚Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ
on startup
AddColor install
colorMe
end startup
on openCard
Send colorMe to this card
pass openCard
end openCard
on closeCard
lock screen
pass closeCard
end closeCard
on colorMe
AddColor colorCard,stamp,30
end colorMe
on openStack
AddColor install
put "╦ propos d'âditer les scripts..." into menuitem 1 of menu 1
set userlevel to 5
set cantmodify of this stack to true
AddColor install
answer "╦ votre place, avant de commencer, je lirai le document ╟ âditer les scripts - Lisez-moi ╚." with "T'occupes"
pass openStack
end openStack
on closeStack
AddColor remove
pass closeStack
end closeStack
on idle
hide Msg
pass idle
end idle
Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ FOND 1 ╟bkgnd id 2598╚ Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ
╫╫ Objet(s) dans FOND 1 sans script : ╫ FOND ╟bkgnd id 2598╚╫
Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ CARTE 1 ╟un╚ Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ
Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ LES CHAMPS DE CARTE
Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ LES BOUTONS DE CARTE
Ñ-Ñ-Ñ-Ñ BOUTON 1 : ╟Bonus╚
on mouseUp
if the optionkey is down then
palette "Bonus"
show window "Bonus" at -111,0
else
answer "Bien jouÄ ! vous avez gagnÄ le SUPER MâGA BONUS." with "KÄsako ???"
palette "Bonus"
show window "Bonus" at -111,0
set cursor to watch
wait 1 seconds
play "sifflement"
answer "Alors, pas mal, hein ? Et c'est opÄrationnel !"&return&&return&&return&┬
"Ñ Cette palette reste affichÄe si vous ouvrez d'autres piles. Ñ" with "Bonus"
play "Hourra"
end if
end mouseUp
Ñ-Ñ-Ñ-Ñ BOUTON 2 : ╟Niveau sonore des alertes╚
on mouseUp
beep
Son
beep
end mouseUp
Ñ-Ñ-Ñ-Ñ BOUTON 3 : ╟Taille de la section donnÄes╚
on mouseUp
global gXCMDError
answer file "Choisissez le fichier, quel qu'il soit, dont vous dÄsirez connaitre la taille de la section des donnÄes (Data Fork) :" --╞
put it into ro
if ro is empty then exit mouseUp
put fileDataSize(ro) into NumberOfBytes
if gXCMDError is not empty then
answer gXCMDError
exit mouseUp
end if
answer "La taille de la section donnÄes du fichier ╟ " & ro & " ╚ est de " && NumberOfBytes/1000┬ --╞
&& " Ko. (soit " && NumberOfBytes/1000000 && " Mo)." --╞
put empty into ro
end mouseUp
Ñ-Ñ-Ñ-Ñ BOUTON 4 : ╟âditer les scripts╚
on mouseUp
global FileName,TtxtLimit,Ro,Index,Partition,theExtract
put No into Partition
put "" into advice
if the optionKey is down then
put yes into Partition
put ", avec partition automatique" into advice
end if
put "" into TtxtLimit
put "" into theExtract
set lockMessages to true
set lockRecent to true
hide Msg
push card
lock screen
go stack ("la pile ê Äditer" & advice)
if the result ¡ "" then
exit mouseUp
end if
set the cantAbort of this stack to true
put the short name of this stack into Ro -- the name of the target to edit
put ro into maxName
repeat with i = 31 down to 24
if the length of maxName = i then delete char i of maxName
end repeat
ask file "Enregistrer l'Ädition des scripts sous╔" with maxName & "'Scpt"
if the result ¡ "" then
pop cd
set the cantAbort of this stack to false
exit mouseUp
end if
put it into FileName
put 1 into Index
if Partition = yes then put validName(FileName) into FileName
open file FileName
set cursor to watch
put the time & " ╤ " & the long date &return ┬
&"╫ Document rÄalisÄ avec ╟ âditer les scripts ╚ - Version 2.1.2 par Roberto Minotti & Jean Patrick Wendt. ╫" ┬
& return & return & "Pour une parfaite lisibilitÄ de ce document, utilisez la " ┬
&"police Monaco 9 points." & return & return into theExtract
put the length of theExtract into TtxtLimit
write theExtract to file FileName
get the script of this stack
if it = "" then put "Pas de script de Pile" into it
put theLines(2) &&"SCRIPT DE PILE ╟ " & Ro &" ╚" & theLines(2) &return┬
& it & return into theExtract
mayWriteExtract
play "Boing"
play "Sifflement"
answer firstAnswer() with "Suffisant" or "Continuer"
if it is "Suffisant" then
close file FileName
pop cd
set the cantAbort of this stack to false
exit mouseUp
end if
put the number of bgs of this stack into N
repeat with i = 1 to N
go bg i
getAllScripts FOND,"bg",i
put theLines(8) &return &return into theExtract
mayWriteExtract
end repeat
put theLines(3) &" This is the End, my only friend. - J.Morrison. "┬
&theLines(3) into theExtract
mayWriteExtract
close file fileName
pop Cd
play "Sifflement"
play "Hourra"
answer lastAnswer() with "So good" -- ╞
set the cantAbort of this stack to false
put "" into fileName
put "" into theExtract
hide Msg
end mouseUp
on getAllScripts fOwner,owner,p
scanScripts fOwner,owner,p
put theLines(4) &return into theExtract
mayWriteExtract
repeat with k = 1 to number of cds of this bg
go cd (k) of this bg
put the number of this cd into NumCd
scanScripts CARTE,"cd",NumCd
end repeat
end getAllScripts
on scanScripts fOwner,owner,p
global EmptyList,fileName,theExtract
put return & theLines(2) && fOwner&& p &&"╟"&(the short name of (owner && p))┬
&"╚"&& theLines(2) &return into theExtract
mayWriteExtract
if script of (owner && p) = "" then
put "╫ " &fOwner&&"╟"& the short name of (owner && p) & "╚╫" after emptyList
else
put return & theLines(2) && "SCRIPT DE " & fOwner && p ┬
& return & script of (owner&&p) & return into theExtract
mayWriteExtract
end if
if the number of (owner && flds) ¡ 0 then
put theLines(2) && "LES CHAMPS DE " & fOwner & return into theExtract
mayWriteExtract
repeat with j = 1 to number of (owner &&flds)
set cursor to busy
getObjScript fOwner,owner,CHAMP,Chp,"fld",j
end repeat
end if
if the number of (owner && btns) ¡ 0 then
put return &theLines(2) && "LES BOUTONS DE " & fOwner┬
& return into theExtract
mayWriteExtract
repeat with j = 1 to number of (owner &&btns)
set cursor to busy
getObjScript fOwner,owner,BOUTON,Btn,"btn",j
end repeat
end if
if EmptyList ¡ "" then
put return & "╫╫ Objet(s) dans"&&fOwner&&p&&"sans script : "┬
& EmptyList &return into theExtract
mayWriteExtract
put "" into EmptyList
end if
end scanScripts
on getObjScript fOwner,owner,fObj,shortObj,obj,j
global EmptyList,FileName,theExtract
get script of (owner && obj && j)
if it = "" or the number of words of it <5 then
put "╫ " &shortObj&&"╟"& the short name of (owner && obj && j) & "╚╫" after EmptyList
exit getObjScript
else put theLines(1) && fObj && j &" : ╟"& the short name of┬
(owner && obj && j) &"╚" & return & it & return into theExtract
mayWriteExtract
end getObjScript
on mayWriteExtract
global TtxtLimit, FileName,Partition,theExtract
set cursor to watch
put the length of theExtract into extractLength
add extractLength to TtxtLimit
if Partition = yes then
if TtxtLimit >31000 then
put extractLength-(TtxtLimit-31000) into cutChar
put char 1 to (cutChar) of theExtract into part1
get the number of lines of part1
put line 1 to (it-1) of theExtract into part1
put line (it) to (the number of lines of theExtract) of theExtract into part2
put part1 into theExtract
repeat with j =(number of lines of part1) down to 1
set cursor to busy
if word 1 of line j of part1 = "on" then
put line 1 to j-1 of part1 into theExtract
put line j to (the number of lines of part1)┬
of part1 before part2
exit repeat
end if
end repeat
write theExtract to file FileName
put part2 into theExtract
createNewFile
write theExtract to file FileName
put (the length of part2) + 60 into TtxtLimit
else if theExtract ¡ "" then write theExtract to file FileName
put "" into theExtract
end if
if theExtract ¡ "" then write theExtract to file FileName
put "" into theExtract
end mayWriteExtract
on createNewFile
global Filename,Index,Ro
set cursor to watch
close file FileName
add 1 to Index
if Index >99 then
beep 2
answer "Les scripts de la pile ╟"&Ro&"╚ dÄjê rÄcupÄrÄs, reprÄsentent 3 Mo de texte "┬
&"enregistrÄs sur 99 fichiers." &return&return& "C'est le nombre maximum de partitions "┬
&"autorisÄes par le programme ╔" with DÄsolÄ
pop cd
set the cantAbort of this stack to false
exit to HyperCard
end if
put Index into last word of FileName
open file FileName
write "Suite "& Index &" des scripts de " & Ro &return&return to file FileName
end createNewFile
function validName temp
repeat with i = (the length of temp) down to 1
if char i of temp ¡ ":" then
put char i of temp before itsName
else exit repeat
end repeat
put length(itsName) - 28 into K
if K >0 then
repeat K
delete last char of temp
end repeat
end if
put " 1" after last word of temp
return temp
end validName
function firstAnswer
global Ro,Index,TtxtLimit,Partition
put (round(TtxtLimit /102.4))/10 into PTxt
put " Ñ Le script de la pile ╟ "& Ro &" ╚ est ÄditÄ Ñ" &return into theAnswer
if Partition = No then
put "Il fait " & Ptxt & " Ko."&return& "╫ SimpleText est limitÄ ê 31 Ko ; "┬
&"pour une partition automatique, recommencez avec la touche Option." & return &return after theAnswer
else put " Il se trouve sur " &Index& " fichier(s)"┬
&" Äditable(s) par SimpleText." & return & return after theAnswer
put "Ñ Voulez-vous Äditer la TOTALITâ de la pile ?" after theAnswer
put the length of TheAnswer -- mise au point
return theAnswer
end firstAnswer
function lastAnswer
global Ro,Index,TtxtLimit,Partition
put (round(TtxtLimit /102.4))/10 into PTxt
put " L'Ädition de tous les scripts de la pile ╟" &Ro ┬
&"╚ est terminÄe." & return into theAnswer
if Partition = No then
put "Ñ Le fichier contient " &PTxt&" Ko de texte ; SimpleText "┬
&"ne peut ouvrir plus de 31 Ko."& return& "Ñ Pour partitionner, "┬
&"recommencez avec la touche Option enfoncÄe."after theAnswer
else
if index = 1 then
put return&"Ñ Son fichier de "&PTxt& " Ko de texte "┬
&"est directement Äditable par SimpleText." after theAnswer
else put return&"Ñ Elle est rÄpartie sur "&index&" fichiers "┬
&"directement Äditables par SimpleText." after theAnswer
end if
put the length of TheAnswer -- mise au point
return theAnswer
end lastAnswer
function theLines Q
repeat Q
put "Ñ-Ñ-Ñ-Ñ-" after bullets
end repeat
delete last char of bullets
return bullets
end theLines
Ñ-Ñ-Ñ-Ñ BOUTON 5 : ╟card button id 9╚
on mouseup
play "1" with loop
go card "deux"
end mouseup
╫╫ Objet(s) dans CARTE 1 sans script : ╫ CARTE ╟un╚╫╫ Chp ╟card field id 8╚╫
Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ CARTE 2 ╟deux╚ Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ
Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ LES CHAMPS DE CARTE
Ñ-Ñ-Ñ-Ñ CHAMP 1 : ╟card field id 1╚
on mouseUp
play "1"
go card "un"
end mouseUp
╫╫ Objet(s) dans CARTE 2 sans script : ╫ CARTE ╟deux╚╫
Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ
Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ This is the End, my only friend. - J.Morrison. Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ-Ñ